1. Field of the Invention
The present invention relates to an image processing method and image processing apparatus to be used in game machines or simulation machines, and in more particular, to an image processing method and image processing apparatus that updates the texture data without any loss in image rendering performance.
2. Description of the Related Art
Game machines and simulation machines execute a game program or simulation program in response to control input from the operator, and display an image that corresponds to the progression of the game or the like. Moreover, these kinds of machines are equipped with image processing apparatus for performing image rendering.
This kind of image processing apparatus employs 3-D computer graphic technology to calculate the movement position or amount of movement of a model created using multiple polygons and to render a polygon at the desired position. When doing this, texture data, which is the polygon pattern, is used. Typically, graphic processors which perform rendering use a frame buffer memory wherein the rendered image data is written, and a texture buffer memory which stores texture data. Moreover, the amount of movement of the model is found by executing a game program or the like, and after the position of the polygon is calculated according to that amount, the graphic processor uses the texture data stored in the texture buffer memory to render a polygon, and then saves the rendered image data in frame buffer.
The rendering is performed within the time period of the frame, and the image generated according to the image data that are stored in the frame buffer is displayed on the display. It is necessary that the rendering process be performed in a short time and it is also desired that access of the texture buffer be performed at high speed. Moreover, static RAM (SRAM) is used as the semiconductor memory that makes high-speed access possible, however the cost per bit of this kind of semiconductor memory is very high when compared with DRAM.
On the other hand, in order to make the displayed image appear more realistic, it is desired that more texture data be used. However, since it is also desired that access be performed at high speed and that cost be reduced, it is not possible to increase the capacity of the texture buffer memory. Therefore, conventionally, the necessary texture data were stored in a large-capacity external memory (mask ROM or hard disk) that was separate from the texture buffer memory and whose access speed was slow. A period of no display was established during the period that the scene changed, and during this period, part or all of the texture data in the texture buffer memory was rewritten with the texture data in the external memory, making it possible to use a lot of texture data.
However, with the conventional method, during the period when the texture data is being rewritten, the rendering process for generating the image is interrupted, and this period becomes a period when there is no image display between scenes, or a period when the image becomes frozen. Moreover, in a racing game where the player races on a course that covers a long distance, or in a role-playing game where the character moves through a long course, it is not possible to rewrite the texture data, and the amount of texture data that can be used is limited.
Therefore, in view of the above problem in the prior art, it is an objective of the present invention to provide an image processing method and image processing apparatus that is capable of updating texture data without interrupting the rendering process.
Furthermore, another objective of the present invention is to provide an image processing method and image processing apparatus that is capable of updating texture data without affecting the performance of the rendering process.
To accomplish these objectives, the present invention is characterized by first performing the necessary rendering in the frame period, then during the remaining time of that frame period, rewriting the texture data in the texture buffer memory. The image rendering process for each frame is performed first, then after the rendering process has been completed for the frame, if there is remaining time, that time is used to rewrite the texture data. Therefore, the rendering process is not interrupted, the displayed image is not interrupted or frozen, and it is possible to rewrite the texture data in the small-capacity texture buffer memory and make it possible to use virtually a lot of texture data to render one scene.
In a preferred embodiment, the necessary rendering process is performed first in each frame period. When the rendering process is finished, the remaining time is used to rewrite the texture data. If the rendering process ends quickly, it is possible to rewrite texture data for that much longer a time period, and if the rendering process requires a long time, the time period for rewriting the texture data becomes shorter. In addition, if the entire frame period is used for performing the rendering process, texture data is not rewritten during that frame period. Normally, the necessary texture data is rewritten over several frame periods.
In order to accomplish the objective above, the present invention is characterized by an image processing method for performing a rendering process by reading a predetermined texture data from a texture buffer memory and generating image data, the method comprising:
a step of performing the rendering process first during the frame period;
and a step of rewriting the texture data in the texture buffer memory during the remaining time of the frame period after the rendering process has been completed.
In addition, in order to accomplish the objectives, the present invention is characterized by an image processing apparatus, having a graphics processor that performs a rendering process by reads a predetermined texture data from the texture buffer memory and generating image data, comprising:
a data memory that stores texture data; and
a texture data updating unit which reads the texture data in the data memory and updates the texture data stored in the texture buffer memory into the read texture data; and
wherein the graphics processor performs the rendering process first during the frame period, and then the texture data update unit updates the texture data during the remaining time in the frame period after the rendering process has been completed.
Moreover, in the above invention, the apparatus further comprises a work memory in which the rendering process data are stored, and a bus that connects the graphics processor, the texture data update unit, the data memory and the work memory; and
wherein the graphics processor reads the rendering process data from the work memory via the bus during the rendering process; and
wherein the texture data update unit reads the texture data in the data memory via the bus during the update process.
Furthermore, in the above invention, during the frame period, the graphics processor supplies a rendering start signal to the texture data update unit at the beginning of the rendering process and then supplies a rendering end signal when the rendering process is completed;
the texture update unit starts the texture data update process in response to the rendering end signal, and stops the texture data update process in response to the rendering start signal.